FLAGSG = -O1 -g -Wall  -I/usr/include/theora
FLAGSO3 = -O3 -Wall -I/usr/include/theora
LIBS = -lglut -lGLU -lpulse -lpulse-simple -lm  -L/usr/lib -logg -ltheora -ltheoradec -ltheoraenc -lvorbis  -lvorbisenc -lX11 -lpthread -lrt


all : quickview clapper

OBJSQV := quickview.o display.o webcam.o util.o
INCLUDESQV := quickview.h webcam.h display.h util.h

OBJSC :=  display.o webcam.o util.o clapper.o savevideo.o sound.o x11display.o
INCLUDESC :=  webcam.h display.h util.h clapper.h savevideo.h sound.h x11display.h



quickview: $(OBJSQV) $(INCLUDESQV) makefile
	gcc $(OBJSQV)  $(LIBS) -o quickview 

clapper: $(OBJSC) $(INCLUDESC) makefile
	gcc $(OBJSC)  $(LIBS) -o clapper 

%.o: %.c *.h makefile
	gcc -c $(FLAGSG) $*.c -o $*.o

clean:
	rm -f  quickview clapper *.o


